package mysql

import "gorm.io/gorm"

// 课程信息表
type Course struct {
	gorm.Model
	Title string  `gorm:"type:varchar(20);not null;comment: 标题"`
	Info  string  `gorm:"type:varchar(500);not null;comment: 介绍"`
	Image string  `gorm:"type:varchar(500);not null;comment: 图片"`
	Uid   int     `gorm:"type:int(11);not null;comment: 用户ID"`
	Price float64 `gorm:"type:decimal(10,2);not null;comment: 价格"`
}

// 评价记录表
type Comment struct {
	gorm.Model
	Uid     int    `gorm:"type:int(11);not null;comment: 用户ID"`
	Cid     int    `gorm:"type:int(11);not null;comment: 课程ID"`
	Comment string `gorm:"type:varchar(500);not null;comment: 评论"`
}

// 收藏信息表
type Collect struct {
	gorm.Model
	Uid int `gorm:"type:int(11);not null;comment: 用户ID"`
	Cid int `gorm:"type:int(11);not null;comment: 课程ID"`
}
